package com.ruoyi.binance.api;

import com.ruoyi.common.utils.spring.SpringUtils;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Config {

    public static final Long RECV_WINDOW = 5000L;

    public static String BASE_URL;
    public static String API_KEY;
    public static String API_SECRET;
    public static String HMAC_SHA256;


    public static final String PING_URL = "/api/v3/ping";
    public static final String TIME_URL = "/api/v3/time";
    public static final String KLINES_URL = "/api/v3/klines";
    public static final String ACCOUNT_URL = "/api/v3/account";
    public static final String ORDER_URL = "/api/v3/order";
    public static final String TRADING_DAY_URL = "/api/v3/ticker/tradingDay";



    public Config() {
        BinanceConfig bean = SpringUtils.getBean(BinanceConfig.class);
        BASE_URL = bean.getBASE_URL();
        API_KEY = bean.getAPI_KEY();
        API_SECRET = bean.getAPI_SECRET();
        HMAC_SHA256 = bean.getHMAC_SHA256();
    }
}
